#ifndef DEF_H
#define DEF_H

#include <assert.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL_image.h>

#define DEBUG 0

#define WINDOW_TITLE "cmus-remote-graphical-sdl-c"
#define WINDOW_W 360
#define WINDOW_H 360

#define BORDER_W 20
#define BORDER_H 20

#define FIELD_W (WINDOW_W - BORDER_W * 2)
#define FIELD_H (WINDOW_H - BORDER_H * 2)

#define FONTSIZE 24
#define FONTHEIGHT ((int) ((float)FONTSIZE * 1.5))

typedef struct {
    uint64_t duration;
    char *file;
    char *album_tag;
    char *albumartist_tag;
    char *artist_tag;
    char *comment_tag;
    char *date_tag;
    char *genre_tag;
    char *title_tag;
    uint64_t discnumber_tag;
    uint64_t tracknumber_tag;
} track;

typedef struct {
    char *aaa_mode;
    char *status;
    uint64_t vol_left;
    uint64_t vol_right;
    uint64_t position;
    bool repeat;
    bool repeat_current;
    bool shuffle;
} player;

#endif